using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MonoCash
{
    public partial class TransactionEditor : Form
    {
        internal TransactionEditor(ObjectModel.Account account)
        {
            InitializeComponent();

            bsAccount.DataSource = account;
            dgvTransactions.DataSource = bsTransactions;
            bsTransactions.CurrentItemChanged += new EventHandler(bsTransactions_CurrentItemChanged);
            dgvSplits.DataSource = bsSplits;
        }

        void bsTransactions_CurrentItemChanged(object sender, EventArgs e)
        {
            bsSplits.ResetBindings(false);
        }
    }
}